<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>SPSession Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<meta name="viewport" content="width=550" />
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.1 (build 840)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">CocoaLibSpotify </a></h1>
				<a id="developerHome" href="../index.html">Spotify AB</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">SPSession Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/audioDeliveryDelegate">&nbsp;&nbsp;&nbsp;&nbsp;audioDeliveryDelegate</option>
	
	<option value="//api/name/connectionState">&nbsp;&nbsp;&nbsp;&nbsp;connectionState</option>
	
	<option value="//api/name/delegate">&nbsp;&nbsp;&nbsp;&nbsp;delegate</option>
	
	<option value="//api/name/inboxPlaylist">&nbsp;&nbsp;&nbsp;&nbsp;inboxPlaylist</option>
	
	<option value="//api/name/loaded">&nbsp;&nbsp;&nbsp;&nbsp;loaded</option>
	
	<option value="//api/name/loadingPolicy">&nbsp;&nbsp;&nbsp;&nbsp;loadingPolicy</option>
	
	<option value="//api/name/locale">&nbsp;&nbsp;&nbsp;&nbsp;locale</option>
	
	<option value="//api/name/offlinePlaylistsRemaining">&nbsp;&nbsp;&nbsp;&nbsp;offlinePlaylistsRemaining</option>
	
	<option value="//api/name/offlineStatistics">&nbsp;&nbsp;&nbsp;&nbsp;offlineStatistics</option>
	
	<option value="//api/name/offlineSyncError">&nbsp;&nbsp;&nbsp;&nbsp;offlineSyncError</option>
	
	<option value="//api/name/offlineSyncing">&nbsp;&nbsp;&nbsp;&nbsp;offlineSyncing</option>
	
	<option value="//api/name/offlineTracksRemaining">&nbsp;&nbsp;&nbsp;&nbsp;offlineTracksRemaining</option>
	
	<option value="//api/name/playbackDelegate">&nbsp;&nbsp;&nbsp;&nbsp;playbackDelegate</option>
	
	<option value="//api/name/playing">&nbsp;&nbsp;&nbsp;&nbsp;playing</option>
	
	<option value="//api/name/privateSession">&nbsp;&nbsp;&nbsp;&nbsp;privateSession</option>
	
	<option value="//api/name/session">&nbsp;&nbsp;&nbsp;&nbsp;session</option>
	
	<option value="//api/name/starredPlaylist">&nbsp;&nbsp;&nbsp;&nbsp;starredPlaylist</option>
	
	<option value="//api/name/user">&nbsp;&nbsp;&nbsp;&nbsp;user</option>
	
	<option value="//api/name/userAgent">&nbsp;&nbsp;&nbsp;&nbsp;userAgent</option>
	
	<option value="//api/name/userPlaylists">&nbsp;&nbsp;&nbsp;&nbsp;userPlaylists</option>
	
	<option value="//api/name/usingVolumeNormalization">&nbsp;&nbsp;&nbsp;&nbsp;usingVolumeNormalization</option>
	
	
	
	
	<option value="class_methods">Class Methods</option>
	
	<option value="//api/name/dispatchToLibSpotifyThread:">&nbsp;&nbsp;&nbsp;&nbsp;+ dispatchToLibSpotifyThread:</option>
	
	<option value="//api/name/dispatchToLibSpotifyThread:waitUntilDone:">&nbsp;&nbsp;&nbsp;&nbsp;+ dispatchToLibSpotifyThread:waitUntilDone:</option>
	
	<option value="//api/name/initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:">&nbsp;&nbsp;&nbsp;&nbsp;+ initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:</option>
	
	<option value="//api/name/launchSpotifyClientIfInstalled">&nbsp;&nbsp;&nbsp;&nbsp;+ launchSpotifyClientIfInstalled</option>
	
	<option value="//api/name/libSpotifyBuildId">&nbsp;&nbsp;&nbsp;&nbsp;+ libSpotifyBuildId</option>
	
	<option value="//api/name/libSpotifyRunloop">&nbsp;&nbsp;&nbsp;&nbsp;+ libSpotifyRunloop</option>
	
	<option value="//api/name/sharedSession">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedSession</option>
	
	<option value="//api/name/spotifyClientInstalled">&nbsp;&nbsp;&nbsp;&nbsp;+ spotifyClientInstalled</option>
	
	
	
	
	<option value="instance_methods">Instance Methods</option>
	
	<option value="//api/name/albumForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- albumForURL:callback:</option>
	
	<option value="//api/name/artistForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- artistForURL:callback:</option>
	
	<option value="//api/name/attemptLoginWithUserName:existingCredential:">&nbsp;&nbsp;&nbsp;&nbsp;- attemptLoginWithUserName:existingCredential:</option>
	
	<option value="//api/name/attemptLoginWithUserName:password:">&nbsp;&nbsp;&nbsp;&nbsp;- attemptLoginWithUserName:password:</option>
	
	<option value="//api/name/fetchLoginUserName:">&nbsp;&nbsp;&nbsp;&nbsp;- fetchLoginUserName:</option>
	
	<option value="//api/name/fetchOfflineKeyTimeRemaining:">&nbsp;&nbsp;&nbsp;&nbsp;- fetchOfflineKeyTimeRemaining:</option>
	
	<option value="//api/name/fetchScrobblingAllowedForService:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- fetchScrobblingAllowedForService:callback:</option>
	
	<option value="//api/name/fetchScrobblingStateForService:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- fetchScrobblingStateForService:callback:</option>
	
	<option value="//api/name/flushCaches:">&nbsp;&nbsp;&nbsp;&nbsp;- flushCaches:</option>
	
	<option value="//api/name/imageForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- imageForURL:callback:</option>
	
	<option value="//api/name/initWithApplicationKey:userAgent:loadingPolicy:error:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithApplicationKey:userAgent:loadingPolicy:error:</option>
	
	<option value="//api/name/logout:">&nbsp;&nbsp;&nbsp;&nbsp;- logout:</option>
	
	<option value="//api/name/objectRepresentationForSpotifyURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- objectRepresentationForSpotifyURL:callback:</option>
	
	<option value="//api/name/objectRepresentationForSpotifyURL:linkType:">&nbsp;&nbsp;&nbsp;&nbsp;- objectRepresentationForSpotifyURL:linkType:</option>
	
	<option value="//api/name/playTrack:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- playTrack:callback:</option>
	
	<option value="//api/name/playlistFolderForFolderId:inContainer:">&nbsp;&nbsp;&nbsp;&nbsp;- playlistFolderForFolderId:inContainer:</option>
	
	<option value="//api/name/playlistForPlaylistStruct:">&nbsp;&nbsp;&nbsp;&nbsp;- playlistForPlaylistStruct:</option>
	
	<option value="//api/name/playlistForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- playlistForURL:callback:</option>
	
	<option value="//api/name/postTracks:toInboxOfUser:withMessage:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- postTracks:toInboxOfUser:withMessage:callback:</option>
	
	<option value="//api/name/preloadTrackForPlayback:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- preloadTrackForPlayback:callback:</option>
	
	<option value="//api/name/searchForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- searchForURL:callback:</option>
	
	<option value="//api/name/seekPlaybackToOffset:">&nbsp;&nbsp;&nbsp;&nbsp;- seekPlaybackToOffset:</option>
	
	<option value="//api/name/setMaximumCacheSizeMB:">&nbsp;&nbsp;&nbsp;&nbsp;- setMaximumCacheSizeMB:</option>
	
	<option value="//api/name/setPreferredBitrate:">&nbsp;&nbsp;&nbsp;&nbsp;- setPreferredBitrate:</option>
	
	<option value="//api/name/setScrobblingState:forService:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- setScrobblingState:forService:callback:</option>
	
	<option value="//api/name/setScrobblingUserName:password:forService:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- setScrobblingUserName:password:forService:callback:</option>
	
	<option value="//api/name/trackForTrackStruct:">&nbsp;&nbsp;&nbsp;&nbsp;- trackForTrackStruct:</option>
	
	<option value="//api/name/trackForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- trackForURL:callback:</option>
	
	<option value="//api/name/unknownPlaylistForPlaylistStruct:">&nbsp;&nbsp;&nbsp;&nbsp;- unknownPlaylistForPlaylistStruct:</option>
	
	<option value="//api/name/unloadPlayback">&nbsp;&nbsp;&nbsp;&nbsp;- unloadPlayback</option>
	
	<option value="//api/name/userForURL:callback:">&nbsp;&nbsp;&nbsp;&nbsp;- userForURL:callback:</option>
	
	<option value="//api/name/userForUserStruct:">&nbsp;&nbsp;&nbsp;&nbsp;- userForUserStruct:</option>
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Logging In and Setup">Logging In and Setup</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Properties">Properties</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Social and Scrobbling">Social and Scrobbling</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Offline Syncing">Offline Syncing</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_User Content">User Content</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Accessing Content by URL">Accessing Content by URL</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Accessing Arbitrary Content">Accessing Arbitrary Content</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Audio Playback">Audio Playback</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/audioDeliveryDelegate">audioDeliveryDelegate</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/connectionState">connectionState</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/delegate">delegate</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/inboxPlaylist">inboxPlaylist</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/loaded">loaded</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/loadingPolicy">loadingPolicy</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/locale">locale</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offlinePlaylistsRemaining">offlinePlaylistsRemaining</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offlineStatistics">offlineStatistics</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offlineSyncError">offlineSyncError</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offlineSyncing">offlineSyncing</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/offlineTracksRemaining">offlineTracksRemaining</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playbackDelegate">playbackDelegate</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playing">playing</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/privateSession">privateSession</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/session">session</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/starredPlaylist">starredPlaylist</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/user">user</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/userAgent">userAgent</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/userPlaylists">userPlaylists</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/usingVolumeNormalization">usingVolumeNormalization</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/dispatchToLibSpotifyThread:">dispatchToLibSpotifyThread:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/dispatchToLibSpotifyThread:waitUntilDone:">dispatchToLibSpotifyThread:waitUntilDone:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:">initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/launchSpotifyClientIfInstalled">launchSpotifyClientIfInstalled</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/libSpotifyBuildId">libSpotifyBuildId</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/libSpotifyRunloop">libSpotifyRunloop</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedSession">sharedSession</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/spotifyClientInstalled">spotifyClientInstalled</a></span></li>
	
</ul></li>



<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/albumForURL:callback:">albumForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/artistForURL:callback:">artistForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/attemptLoginWithUserName:existingCredential:">attemptLoginWithUserName:existingCredential:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/attemptLoginWithUserName:password:">attemptLoginWithUserName:password:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/fetchLoginUserName:">fetchLoginUserName:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/fetchOfflineKeyTimeRemaining:">fetchOfflineKeyTimeRemaining:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/fetchScrobblingAllowedForService:callback:">fetchScrobblingAllowedForService:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/fetchScrobblingStateForService:callback:">fetchScrobblingStateForService:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/flushCaches:">flushCaches:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageForURL:callback:">imageForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithApplicationKey:userAgent:loadingPolicy:error:">initWithApplicationKey:userAgent:loadingPolicy:error:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/logout:">logout:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/objectRepresentationForSpotifyURL:callback:">objectRepresentationForSpotifyURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/objectRepresentationForSpotifyURL:linkType:">objectRepresentationForSpotifyURL:linkType:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playTrack:callback:">playTrack:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playlistFolderForFolderId:inContainer:">playlistFolderForFolderId:inContainer:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playlistForPlaylistStruct:">playlistForPlaylistStruct:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/playlistForURL:callback:">playlistForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/postTracks:toInboxOfUser:withMessage:callback:">postTracks:toInboxOfUser:withMessage:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/preloadTrackForPlayback:callback:">preloadTrackForPlayback:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/searchForURL:callback:">searchForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/seekPlaybackToOffset:">seekPlaybackToOffset:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setMaximumCacheSizeMB:">setMaximumCacheSizeMB:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setPreferredBitrate:">setPreferredBitrate:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setScrobblingState:forService:callback:">setScrobblingState:forService:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setScrobblingUserName:password:forService:callback:">setScrobblingUserName:password:forService:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/trackForTrackStruct:">trackForTrackStruct:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/trackForURL:callback:">trackForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/unknownPlaylistForPlaylistStruct:">unknownPlaylistForPlaylistStruct:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/unloadPlayback">unloadPlayback</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/userForURL:callback:">userForURL:callback:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/userForUserStruct:">userForUserStruct:</a></span></li>
	
</ul></li>


			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="SPSession Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">SPSession Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Conforms to</td>
	<td class="specification-value"><a href="../Protocols/SPAsyncLoading.html">SPAsyncLoading</a><br />SPSessionPlaybackProvider</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">SPSession.h<br />SPSession.m</td>
</tr>
						</tbody></table></div>
					
					
					
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>This class provides core functionality for interacting with Spotify. You must have a valid, logged-in
SPSession object before using any other part of the API.</p>

<p>To log in and use CocoaLibSpotify, you need two things:</p>

<ul>
<li>An application key, available at the <a href="http://developer.spotify.com/">Spotify Developer Site</a>.</li>
<li>A <a href="#//api/name/user">user</a> account with the Premium subscription level.</li>
</ul>


<p>Playback</p>

<p>Please note that CocoaLibSpotify does <em>not</em> push audio data to the system&rsquo;s audio
output. To hear tracks, you need to push the raw audio data provided to your application
as you see fit. See the SimplePlayback sample project for an example of how to do this.</p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						
						<h3 class="subsubtitle task-title">Other Methods</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/dispatchToLibSpotifyThread:">+&nbsp;dispatchToLibSpotifyThread:</a></code>
		<span class="tooltip"><p>Executes the given block on the libspotify thread.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/dispatchToLibSpotifyThread:waitUntilDone:">+&nbsp;dispatchToLibSpotifyThread:waitUntilDone:</a></code>
		<span class="tooltip"><p>Executes the given block on the libspotify thread.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/libSpotifyRunloop">+&nbsp;libSpotifyRunloop</a></code>
		<span class="tooltip"><p>Returns the runloop that is running libspotify.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/spotifyClientInstalled">+&nbsp;spotifyClientInstalled</a></code>
		<span class="tooltip"><p>Returns <code>YES</code> if the Spotify client is installed on the current device/machine.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/launchSpotifyClientIfInstalled">+&nbsp;launchSpotifyClientIfInstalled</a></code>
		<span class="tooltip"><p>Attempts to launch the Spotify client. Returns <code>YES</code> if successful.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/sharedSession">+&nbsp;sharedSession</a></code>
		<span class="tooltip"><p>Returns a shared SPSession object.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:">+&nbsp;initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:</a></code>
		<span class="tooltip"><p>Initializes the shared SPSession object.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/libSpotifyBuildId">+&nbsp;libSpotifyBuildId</a></code>
		<span class="tooltip"><p>The &ldquo;debug&rdquo; build ID of libspotify.</p></span>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Logging In and Setup" name="task_Logging In and Setup"></a>
						<h3 class="subsubtitle task-title">Logging In and Setup</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/initWithApplicationKey:userAgent:loadingPolicy:error:">&ndash;&nbsp;initWithApplicationKey:userAgent:loadingPolicy:error:</a></code>
		<span class="tooltip"><p>Initialize a new SPSession object.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/attemptLoginWithUserName:password:">&ndash;&nbsp;attemptLoginWithUserName:password:</a></code>
		<span class="tooltip"><p>Attempt to login to the Spotify service.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/attemptLoginWithUserName:existingCredential:">&ndash;&nbsp;attemptLoginWithUserName:existingCredential:</a></code>
		<span class="tooltip"><p>Attempt to login to the Spotify service using an existing login credentials blob.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/fetchLoginUserName:">&ndash;&nbsp;fetchLoginUserName:</a></code>
		<span class="tooltip"><p>The username used to log in to this <a href="#//api/name/session">session</a>.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/flushCaches:">&ndash;&nbsp;flushCaches:</a></code>
		<span class="tooltip"><p>Manually flush libSpotify&rsquo;s caches.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/logout:">&ndash;&nbsp;logout:</a></code>
		<span class="tooltip"><p>Log out from the Spotify service.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/connectionState">&nbsp;&nbsp;connectionState</a></code>
		<span class="tooltip"><p>Returns the current connection state.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setMaximumCacheSizeMB:">&ndash;&nbsp;setMaximumCacheSizeMB:</a></code>
		<span class="tooltip"><p>Set the maximum cache size, in megabytes.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setPreferredBitrate:">&ndash;&nbsp;setPreferredBitrate:</a></code>
		<span class="tooltip"><p>Set the preferred audio bitrate for playback.</p></span>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Properties" name="task_Properties"></a>
						<h3 class="subsubtitle task-title">Properties</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
		<span class="tooltip"><p>Returns the current delegate object.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/session">&nbsp;&nbsp;session</a></code>
		<span class="tooltip"><p>Returns the opaque structure used by the C LibSpotify API.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/userAgent">&nbsp;&nbsp;userAgent</a></code>
		<span class="tooltip"><p>Returns the <a href="#//api/name/user">user</a> agent value the <a href="#//api/name/session">session</a> was initialized with.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/loadingPolicy">&nbsp;&nbsp;loadingPolicy</a></code>
		<span class="tooltip"><p>Returns the loading policy of the <a href="#//api/name/session">session</a>.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Social and Scrobbling" name="task_Social and Scrobbling"></a>
						<h3 class="subsubtitle task-title">Social and Scrobbling</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/privateSession">&nbsp;&nbsp;privateSession</a></code>
		<span class="tooltip"><p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> is currently a &ldquo;Private&rdquo; <a href="#//api/name/session">session</a> &ndash; that is, scrobbling to
social services is temporarily disabled.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setScrobblingState:forService:callback:">&ndash;&nbsp;setScrobblingState:forService:callback:</a></code>
		<span class="tooltip"><p>Sets the scrobbling status for the given social service.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/setScrobblingUserName:password:forService:callback:">&ndash;&nbsp;setScrobblingUserName:password:forService:callback:</a></code>
		<span class="tooltip"><p>Sets the scrobbling credientials for the given social service.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/fetchScrobblingStateForService:callback:">&ndash;&nbsp;fetchScrobblingStateForService:callback:</a></code>
		<span class="tooltip"><p>Gets the scrobbling status for the given social service.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/fetchScrobblingAllowedForService:callback:">&ndash;&nbsp;fetchScrobblingAllowedForService:callback:</a></code>
		<span class="tooltip"><p>Gets whether scrobbling is allowed for the given service.</p></span>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Offline Syncing" name="task_Offline Syncing"></a>
						<h3 class="subsubtitle task-title">Offline Syncing</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/offlineSyncing">&nbsp;&nbsp;offlineSyncing</a></code>
		<span class="tooltip"><p>Returns <code>YES</code> if tracks are currently being down<a href="#//api/name/loaded">loaded</a> for offline playback, otherwise <code>NO</code>.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/offlineTracksRemaining">&nbsp;&nbsp;offlineTracksRemaining</a></code>
		<span class="tooltip"><p>Returns the number of tracks still waiting to be down<a href="#//api/name/loaded">loaded</a> for offline playback.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/offlinePlaylistsRemaining">&nbsp;&nbsp;offlinePlaylistsRemaining</a></code>
		<span class="tooltip"><p>Returns the number of playlists still waiting to be down<a href="#//api/name/loaded">loaded</a> for offline playback.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/offlineStatistics">&nbsp;&nbsp;offlineStatistics</a></code>
		<span class="tooltip"><p>Returns a dictionary containing information about any offline sync activity. See Contants for keys.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/fetchOfflineKeyTimeRemaining:">&ndash;&nbsp;fetchOfflineKeyTimeRemaining:</a></code>
		<span class="tooltip"><p>Get the time until the <a href="#//api/name/user">user</a> needs to reconnect to Spotify to renew offline syncing keys.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/offlineSyncError">&nbsp;&nbsp;offlineSyncError</a></code>
		<span class="tooltip"><p>Returns the last error encountered during offline syncing, or <code>nil</code> if there is no problem.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/loaded">&nbsp;&nbsp;loaded</a></code>
		<span class="tooltip"><p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> has finished loading.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="User Content" name="task_User Content"></a>
						<h3 class="subsubtitle task-title">User Content</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/inboxPlaylist">&nbsp;&nbsp;inboxPlaylist</a></code>
		<span class="tooltip"><p>Returns the logged in user&rsquo;s inbox playlist.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/locale">&nbsp;&nbsp;locale</a></code>
		<span class="tooltip"><p>Returns the locale of the logged-in <a href="#//api/name/user">user</a>.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/starredPlaylist">&nbsp;&nbsp;starredPlaylist</a></code>
		<span class="tooltip"><p>Returns the logged in user&rsquo;s starred playlist.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/user">&nbsp;&nbsp;user</a></code>
		<span class="tooltip"><p>Returns the current logged in user.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/userPlaylists">&nbsp;&nbsp;userPlaylists</a></code>
		<span class="tooltip"><p>Returns an <a href="../Classes/SPPlaylistContainer.html">SPPlaylistContainer</a> object that contains the user&rsquo;s playlists.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/postTracks:toInboxOfUser:withMessage:callback:">&ndash;&nbsp;postTracks:toInboxOfUser:withMessage:callback:</a></code>
		<span class="tooltip"><p>Send tracks to another Spotify <a href="#//api/name/user">user</a>.</p></span>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Accessing Content by URL" name="task_Accessing Content by URL"></a>
						<h3 class="subsubtitle task-title">Accessing Content by URL</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/albumForURL:callback:">&ndash;&nbsp;albumForURL:callback:</a></code>
		<span class="tooltip"><p>Get an <a href="../Classes/SPAlbum.html">SPAlbum</a> object representing the given URL, or <code>nil</code> if the URL is not a valid album URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/artistForURL:callback:">&ndash;&nbsp;artistForURL:callback:</a></code>
		<span class="tooltip"><p>Get an <a href="../Classes/SPArtist.html">SPArtist</a> object representing the given URL, or <code>nil</code> if the URL is not a valid artist URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/imageForURL:callback:">&ndash;&nbsp;imageForURL:callback:</a></code>
		<span class="tooltip"><p>Returns an <a href="../Classes/SPImage.html">SPImage</a> object representing the given URL, or <code>nil</code> if the URL is not a valid image URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/playlistForURL:callback:">&ndash;&nbsp;playlistForURL:callback:</a></code>
		<span class="tooltip"><p>Returns an <a href="../Classes/SPPlaylist.html">SPPlaylist</a> object representing the given URL, or <code>nil</code> if the URL is not a valid playlist URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/searchForURL:callback:">&ndash;&nbsp;searchForURL:callback:</a></code>
		<span class="tooltip"><p>Returns an <a href="../Classes/SPSearch.html">SPSearch</a> object representing the given URL, or <code>nil</code> if the URL is not a valid search URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/trackForURL:callback:">&ndash;&nbsp;trackForURL:callback:</a></code>
		<span class="tooltip"><p>Returns an <a href="../Classes/SPTrack.html">SPTrack</a> object representing the given URL, or <code>nil</code> if the URL is not a valid track URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/userForURL:callback:">&ndash;&nbsp;userForURL:callback:</a></code>
		<span class="tooltip"><p>Returns an <a href="../Classes/SPUser.html">SPUser</a> object representing the given URL, or <code>nil</code> if the URL is not a valid <a href="#//api/name/user">user</a> URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/objectRepresentationForSpotifyURL:linkType:">&ndash;&nbsp;objectRepresentationForSpotifyURL:linkType:</a></code>
		<span class="tooltip"><p>Returns an object representation of the given Spotify URL.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/objectRepresentationForSpotifyURL:callback:">&ndash;&nbsp;objectRepresentationForSpotifyURL:callback:</a></code>
		<span class="tooltip"><p>Returns an object representation of the given Spotify URL.</p></span>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Accessing Arbitrary Content" name="task_Accessing Arbitrary Content"></a>
						<h3 class="subsubtitle task-title">Accessing Arbitrary Content</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/playlistForPlaylistStruct:">&ndash;&nbsp;playlistForPlaylistStruct:</a></code>
		<span class="tooltip"><p>Create and cache an <a href="../Classes/SPPlaylist.html">SPPlaylist</a> for the given sp_playlist struct from the C LibSpotify API.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/playlistFolderForFolderId:inContainer:">&ndash;&nbsp;playlistFolderForFolderId:inContainer:</a></code>
		<span class="tooltip"><p>Create and cache an <a href="../Classes/SPPlaylistFolder.html">SPPlaylistFolder</a> for the given folder ID from the C LibSpotify API.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/unknownPlaylistForPlaylistStruct:">&ndash;&nbsp;unknownPlaylistForPlaylistStruct:</a></code>
		<span class="tooltip"><p>Create and cache an SPUnknownPlaylist (subclass of <a href="../Classes/SPPlaylist.html">SPPlaylist</a>) for the given sp_playlist struct from the C LibSpotify API.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/trackForTrackStruct:">&ndash;&nbsp;trackForTrackStruct:</a></code>
		<span class="tooltip"><p>Create and cache an <a href="../Classes/SPTrack.html">SPTrack</a> for the given sp_track struct from the C LibSpotify API.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/userForUserStruct:">&ndash;&nbsp;userForUserStruct:</a></code>
		<span class="tooltip"><p>Create and cache an <a href="../Classes/SPUser.html">SPUser</a> for the given sp_<a href="#//api/name/user">user</a> struct from the C LibSpotify API.</p></span>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Audio Playback" name="task_Audio Playback"></a>
						<h3 class="subsubtitle task-title">Audio Playback</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/usingVolumeNormalization">&nbsp;&nbsp;usingVolumeNormalization</a></code>
		<span class="tooltip"><p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> is employing volume normalization (that is, attempts to keep the
sound level of each track the same), otherwise <code>NO</code>.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/playing">&nbsp;&nbsp;playing</a></code>
		<span class="tooltip"><p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> is currently playing a track, otherwise <code>NO</code>.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/playbackDelegate">&nbsp;&nbsp;playbackDelegate</a></code>
		<span class="tooltip"><p>Returns the session&rsquo;s playback <a href="#//api/name/delegate">delegate</a> object.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/audioDeliveryDelegate">&nbsp;&nbsp;audioDeliveryDelegate</a></code>
		<span class="tooltip"><p>Returns the session&rsquo;s audio delivery <a href="#//api/name/delegate">delegate</a> object.</p></span>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/preloadTrackForPlayback:callback:">&ndash;&nbsp;preloadTrackForPlayback:callback:</a></code>
		<span class="tooltip"><p>Preloads playback assets for the given track.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/playTrack:callback:">&ndash;&nbsp;playTrack:callback:</a></code>
		<span class="tooltip"><p>Start <a href="#//api/name/playing">playing</a> the given track.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/seekPlaybackToOffset:">&ndash;&nbsp;seekPlaybackToOffset:</a></code>
		<span class="tooltip"><p>Seek the current playback position to the given time.</p></span>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/unloadPlayback">&ndash;&nbsp;unloadPlayback</a></code>
		<span class="tooltip"><p>Unload playback resources from memory.</p></span>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/audioDeliveryDelegate" title="audioDeliveryDelegate"></a>
	<h3 class="subsubtitle method-title">audioDeliveryDelegate</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the session&rsquo;s audio delivery <a href="#//api/name/delegate">delegate</a> object.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, assign) __unsafe_unretained id&lt;SPSessionAudioDeliveryDelegate&gt; audioDeliveryDelegate</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The audio delivery <a href="#//api/name/delegate">delegate</a> is responsible for pushing raw audio data provided by the <a href="#//api/name/session">session</a>
to the system&rsquo;s audio output. See the SimplePlayback sample project for an example of how to do this.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/connectionState" title="connectionState"></a>
	<h3 class="subsubtitle method-title">connectionState</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the current connection state.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) sp_connectionstate connectionState</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Possible values:</p>

<p>SP_CONNECTION_STATE_LOGGED_OUT<br/>
User not yet logged in.</p>

<p>SP_CONNECTION_STATE_OFFLINE
User is logged in but in offline mode.</p>

<p>SP_CONNECTION_STATE_LOGGED_IN <br/>
Logged in against a Spotify access point.</p>

<p>SP_CONNECTION_STATE_DISCONNECTED  <br/>
Was logged in, but has now been disconnected.</p>

<p>SP_CONNECTION_STATE_UNDEFINED <br/>
The connection state is undefined.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/delegate" title="delegate"></a>
	<h3 class="subsubtitle method-title">delegate</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the current delegate object.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, assign) __unsafe_unretained id&lt;SPSessionDelegate&gt; delegate</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/inboxPlaylist" title="inboxPlaylist"></a>
	<h3 class="subsubtitle method-title">inboxPlaylist</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the logged in user&rsquo;s inbox playlist.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) SPPlaylist *inboxPlaylist</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The inbox playlist contains tracks sent to the <a href="#//api/name/user">user</a> by other Spotify users, and is
updated as new tracks are sent to the <a href="#//api/name/user">user</a>.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/loaded" title="loaded"></a>
	<h3 class="subsubtitle method-title">loaded</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> has finished loading.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, getter=isLoaded) BOOL loaded</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The <a href="#//api/name/session">session</a> is considered loaded when the <a href="#//api/name/inboxPlaylist"><code>inboxPlaylist</code></a>, <a href="#//api/name/starredPlaylist"><code>starredPlaylist</code></a>,
<a href="#//api/name/user"><code>user</code></a>, <a href="#//api/name/locale"><code>locale</code></a> and <a href="#//api/name/userPlaylists"><code>userPlaylists</code></a> properties are set.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/loadingPolicy" title="loadingPolicy"></a>
	<h3 class="subsubtitle method-title">loadingPolicy</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the loading policy of the <a href="#//api/name/session">session</a>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) SPAsyncLoadingPolicy loadingPolicy</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/locale" title="locale"></a>
	<h3 class="subsubtitle method-title">locale</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the locale of the logged-in <a href="#//api/name/user">user</a>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) NSLocale *locale</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/offlinePlaylistsRemaining" title="offlinePlaylistsRemaining"></a>
	<h3 class="subsubtitle method-title">offlinePlaylistsRemaining</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the number of playlists still waiting to be down<a href="#//api/name/loaded">loaded</a> for offline playback.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NSUInteger offlinePlaylistsRemaining</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/offlineStatistics" title="offlineStatistics"></a>
	<h3 class="subsubtitle method-title">offlineStatistics</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns a dictionary containing information about any offline sync activity. See Contants for keys.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, copy) NSDictionary *offlineStatistics</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/offlineSyncError" title="offlineSyncError"></a>
	<h3 class="subsubtitle method-title">offlineSyncError</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the last error encountered during offline syncing, or <code>nil</code> if there is no problem.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) NSError *offlineSyncError</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/offlineSyncing" title="offlineSyncing"></a>
	<h3 class="subsubtitle method-title">offlineSyncing</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns <code>YES</code> if tracks are currently being down<a href="#//api/name/loaded">loaded</a> for offline playback, otherwise <code>NO</code>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, getter=isOfflineSyncing) BOOL offlineSyncing</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/offlineTracksRemaining" title="offlineTracksRemaining"></a>
	<h3 class="subsubtitle method-title">offlineTracksRemaining</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the number of tracks still waiting to be down<a href="#//api/name/loaded">loaded</a> for offline playback.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NSUInteger offlineTracksRemaining</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playbackDelegate" title="playbackDelegate"></a>
	<h3 class="subsubtitle method-title">playbackDelegate</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the session&rsquo;s playback <a href="#//api/name/delegate">delegate</a> object.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, assign) __unsafe_unretained id&lt;SPSessionPlaybackDelegate&gt; playbackDelegate</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The playback <a href="#//api/name/delegate">delegate</a> is responsible for dealing with playback events from CocoaLibSpotify, such as
playback ending or being paused because the account is being used for playback elsewhere.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playing" title="playing"></a>
	<h3 class="subsubtitle method-title">playing</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> is currently playing a track, otherwise <code>NO</code>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, getter=isPlaying) BOOL playing</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/privateSession" title="privateSession"></a>
	<h3 class="subsubtitle method-title">privateSession</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> is currently a &ldquo;Private&rdquo; <a href="#//api/name/session">session</a> &ndash; that is, scrobbling to
social services is temporarily disabled.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, getter=isPrivateSession) BOOL privateSession</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<div class="warning"><p><strong>Warning:</strong> <em>Important:</em> This may change back to <code>NO</code> after a long period of inactivity.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/session" title="session"></a>
	<h3 class="subsubtitle method-title">session</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the opaque structure used by the C LibSpotify API.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) sp_session *session</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<div class="warning"><p><strong>Warning:</strong> This method <em>must</em> be called on the libSpotify thread. See the
&ldquo;Threading&rdquo; section of the library&rsquo;s readme for more information.</p></div><div class="warning"><p><strong>Warning:</strong> This should only be used if you plan to directly use the
C LibSpotify API. The behaviour of CocoaLibSpotify is undefined if you use the C
API directly on items that have CocoaLibSpotify objects associated with them.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/starredPlaylist" title="starredPlaylist"></a>
	<h3 class="subsubtitle method-title">starredPlaylist</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the logged in user&rsquo;s starred playlist.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) SPPlaylist *starredPlaylist</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The starred playlist contains tracks starred by the <a href="#//api/name/user">user</a>, and is updated as new tracks are
starred or unstarred.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/user" title="user"></a>
	<h3 class="subsubtitle method-title">user</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the current logged in user.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) SPUser *user</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/userAgent" title="userAgent"></a>
	<h3 class="subsubtitle method-title">userAgent</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the <a href="#//api/name/user">user</a> agent value the <a href="#//api/name/session">session</a> was initialized with.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, readonly) NSString *userAgent</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/userPlaylists" title="userPlaylists"></a>
	<h3 class="subsubtitle method-title">userPlaylists</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an <a href="../Classes/SPPlaylistContainer.html">SPPlaylistContainer</a> object that contains the user&rsquo;s playlists.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, strong) SPPlaylistContainer *userPlaylists</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SPPlaylistContainer.html">SPPlaylistContainer</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/usingVolumeNormalization" title="usingVolumeNormalization"></a>
	<h3 class="subsubtitle method-title">usingVolumeNormalization</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns <code>YES</code> if the <a href="#//api/name/session">session</a> is employing volume normalization (that is, attempts to keep the
sound level of each track the same), otherwise <code>NO</code>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>@property (nonatomic, readwrite, getter=isUsingVolumeNormalization) BOOL usingVolumeNormalization</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<div class="warning"><p><strong>Warning:</strong> This property currently has no effect on iOS platforms.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Class Methods" name="class_methods"></a>
						<h2 class="subtitle subtitle-methods">Class Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/dispatchToLibSpotifyThread:" title="dispatchToLibSpotifyThread:"></a>
	<h3 class="subsubtitle method-title">dispatchToLibSpotifyThread:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Executes the given block on the libspotify thread.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (void)dispatchToLibSpotifyThread:(dispatch_block_t)<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to execute.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Any methods in CocoaLibSpotify that publicly expose parts of the libSpotify C API <em>or</em> direct calls
to libSpotify&rsquo;s C functions must be called on the libspotify thead by passing a block to this method.
This thread is dedicated to libSpotify and is separate from the application&rsquo;s main thread.</p>

<p>Methods in CocoaLibSpotify that require execution on this thread are documented as such, and will throw an
assertion if called from any other thread. libSpotify C functions will not throw an assertion &ndash; instead
you&rsquo;re likely to trigger an apparently random crash in the future since the library is not thread-safe.</p>

<p>Examples for using this thread properly can be found in the project&rsquo;s README file.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/dispatchToLibSpotifyThread:waitUntilDone:" title="dispatchToLibSpotifyThread:waitUntilDone:"></a>
	<h3 class="subsubtitle method-title">dispatchToLibSpotifyThread:waitUntilDone:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Executes the given block on the libspotify thread.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (void)dispatchToLibSpotifyThread:(dispatch_block_t)<em>block</em> waitUntilDone:(BOOL)<em>wait</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to execute.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>wait</em></dt>
			<dd><p>If <code>YES</code>, this method will block until the block has completed executing. This is not recommended.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Any methods in CocoaLibSpotify that publicly expose parts of the libSpotify C API <em>or</em> direct calls
to libSpotify&rsquo;s C functions must be called on the libspotify thead by passing a block to this method.
This thread is dedicated to libSpotify and is separate from the application&rsquo;s main thread.</p>

<p>Methods in CocoaLibSpotify that require execution on this thread are documented as such, and will throw an
assertion if called from any other thread. libSpotify C functions will not throw an assertion &ndash; instead
you&rsquo;re likely to trigger an apparently random crash in the future since the library is not thread-safe.</p>

<p>Examples for using this thread properly can be found in the project&rsquo;s README file.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:" title="initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:"></a>
	<h3 class="subsubtitle method-title">initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initializes the shared SPSession object.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (BOOL)initializeSharedSessionWithApplicationKey:(NSData *)<em>appKey</em> userAgent:(NSString *)<em>userAgent</em> loadingPolicy:(SPAsyncLoadingPolicy)<em>policy</em> error:(NSError **)<em>error</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>appKey</em></dt>
			<dd><p>Your application key as an NSData.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>userAgent</em></dt>
			<dd><p>Your application&rsquo;s <a href="#//api/name/user">user</a> agent (for example, com.yourcompany.MyGreatApp).</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>policy</em></dt>
			<dd><p>The loading policy to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>error</em></dt>
			<dd><p>An error pointer to be filled with an NSError should a login problem occur.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p><code>YES</code> the the shared <a href="#//api/name/session">session</a> was initialized correctly, otherwise <code>NO</code>.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Your application key and <a href="#//api/name/user">user</a> agent must be valid to create an SPSession object.</p><div class="warning"><p><strong>Warning:</strong> The C API that CocoaLibSpotify uses (LibSpotify) doesn&rsquo;t
support using multiple sessions in the same process. While you can either create and
store your SPSession object using this convenience method or yourself using <a href="#//api/name/initWithApplicationKey:userAgent:loadingPolicy:error:">[SPSession initWithApplicationKey:userAgent:loadingPolicy:error:]</a>,
make sure you only have <em>one</em> instance of SPSession active in your process at a time.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/launchSpotifyClientIfInstalled" title="launchSpotifyClientIfInstalled"></a>
	<h3 class="subsubtitle method-title">launchSpotifyClientIfInstalled</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Attempts to launch the Spotify client. Returns <code>YES</code> if successful.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (BOOL)launchSpotifyClientIfInstalled</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/libSpotifyBuildId" title="libSpotifyBuildId"></a>
	<h3 class="subsubtitle method-title">libSpotifyBuildId</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The &ldquo;debug&rdquo; build ID of libspotify.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (NSString *)libSpotifyBuildId</code></div>
	
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns an NSString representing the build ID of the currently running version of libspotify.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This could be useful to display somewhere deep down in the <a href="#//api/name/user">user</a> interface in
case you (or Spotify) would like to know the exact version running.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/libSpotifyRunloop" title="libSpotifyRunloop"></a>
	<h3 class="subsubtitle method-title">libSpotifyRunloop</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns the runloop that is running libspotify.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (CFRunLoopRef)libSpotifyRunloop</code></div>
	
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>The runloop running libspotify.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Calls to the libspotify C API and certain CocoaLibSpotify methods must be made on this
runloop. See <a href="#//api/name/dispatchToLibSpotifyThread:">[SPSession dispatchToLibSpotifyThread:]</a> to a convenient way to do this.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="#//api/name/dispatchToLibSpotifyThread:">[SPSession dispatchToLibSpotifyThread:]</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/sharedSession" title="sharedSession"></a>
	<h3 class="subsubtitle method-title">sharedSession</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns a shared SPSession object.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (SPSession *)sharedSession</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This is a convenience method for creating and storing a single SPSession instance.</p><div class="warning"><p><strong>Warning:</strong> The C API that CocoaLibSpotify uses (LibSpotify) doesn&rsquo;t
support using multiple sessions in the same process. While you can either create and
store your SPSession object using this convenience method or yourself using <a href="#//api/name/init">[SPSession init]</a>,
make sure you only have <em>one</em> instance of SPSession active in your process at a time.</p></div><div class="warning"><p><strong>Warning:</strong> This will return <code>nil</code> until <a href="#//api/name/initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:">[SPSession initializeSharedSessionWithApplicationKey:userAgent:loadingPolicy:error:]</a> is
successfully called.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/spotifyClientInstalled" title="spotifyClientInstalled"></a>
	<h3 class="subsubtitle method-title">spotifyClientInstalled</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns <code>YES</code> if the Spotify client is installed on the current device/machine.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>+ (BOOL)spotifyClientInstalled</code></div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					<div class="section section-methods">
						<a title="Instance Methods" name="instance_methods"></a>
						<h2 class="subtitle subtitle-methods">Instance Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/albumForURL:callback:" title="albumForURL:callback:"></a>
	<h3 class="subsubtitle method-title">albumForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Get an <a href="../Classes/SPAlbum.html">SPAlbum</a> object representing the given URL, or <code>nil</code> if the URL is not a valid album URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)albumForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPAlbum *album ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the album.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the album, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/artistForURL:callback:" title="artistForURL:callback:"></a>
	<h3 class="subsubtitle method-title">artistForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Get an <a href="../Classes/SPArtist.html">SPArtist</a> object representing the given URL, or <code>nil</code> if the URL is not a valid artist URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)artistForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPArtist *artist ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the artist.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the artist, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/attemptLoginWithUserName:existingCredential:" title="attemptLoginWithUserName:existingCredential:"></a>
	<h3 class="subsubtitle method-title">attemptLoginWithUserName:existingCredential:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Attempt to login to the Spotify service using an existing login credentials blob.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)attemptLoginWithUserName:(NSString *)<em>userName</em> existingCredential:(NSString *)<em>credential</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>userName</em></dt>
			<dd><p>The username of the <a href="#//api/name/user">user</a> who wishes to log in.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>credential</em></dt>
			<dd><p>A login credential string previously provided by the <code>-session:didGenerateLoginCredentials:forUserName:</code> <a href="#//api/name/delegate">delegate</a> method.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Login success or fail methods will be called on the session&rsquo;s <a href="#//api/name/delegate">delegate</a>.</p><div class="warning"><p><strong>Warning:</strong> You must have successfully logged in to the Spotify service before using
most other API methods.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/attemptLoginWithUserName:password:" title="attemptLoginWithUserName:password:"></a>
	<h3 class="subsubtitle method-title">attemptLoginWithUserName:password:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Attempt to login to the Spotify service.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)attemptLoginWithUserName:(NSString *)<em>userName</em> password:(NSString *)<em>password</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>userName</em></dt>
			<dd><p>The username of the <a href="#//api/name/user">user</a> who wishes to log in.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>password</em></dt>
			<dd><p>The password for the <a href="#//api/name/user">user</a> who wishes to log in.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Login success or fail methods will be called on the session&rsquo;s <a href="#//api/name/delegate">delegate</a>.</p><div class="warning"><p><strong>Warning:</strong> You must have successfully logged in to the Spotify service before using
most other API methods.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/fetchLoginUserName:" title="fetchLoginUserName:"></a>
	<h3 class="subsubtitle method-title">fetchLoginUserName:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>The username used to log in to this <a href="#//api/name/session">session</a>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)fetchLoginUserName:(void ( ^ ) ( NSString *loginUserName ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the username that was used to login to the current <a href="#//api/name/session">session</a>, or
<code>nil</code> if the <a href="#//api/name/session">session</a> is not logged in.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/fetchOfflineKeyTimeRemaining:" title="fetchOfflineKeyTimeRemaining:"></a>
	<h3 class="subsubtitle method-title">fetchOfflineKeyTimeRemaining:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Get the time until the <a href="#//api/name/user">user</a> needs to reconnect to Spotify to renew offline syncing keys.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)fetchOfflineKeyTimeRemaining:(void ( ^ ) ( NSTimeInterval remainingTime ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the remaining time.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/fetchScrobblingAllowedForService:callback:" title="fetchScrobblingAllowedForService:callback:"></a>
	<h3 class="subsubtitle method-title">fetchScrobblingAllowedForService:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Gets whether scrobbling is allowed for the given service.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)fetchScrobblingAllowedForService:(sp_social_provider)<em>service</em> callback:(void ( ^ ) ( BOOL scrobblingAllowed , NSError *error ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>service</em></dt>
			<dd><p>The social service to get status for.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the scrobbling state for the given service, or an <code>NSError</code> if a problem occurred.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>If this method returns <code>NO</code> for a given service, it cannot be scrobbled to. UI for setting up scrobbling
for the service should either be disabled or hidden in this case.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/fetchScrobblingStateForService:callback:" title="fetchScrobblingStateForService:callback:"></a>
	<h3 class="subsubtitle method-title">fetchScrobblingStateForService:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Gets the scrobbling status for the given social service.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)fetchScrobblingStateForService:(sp_social_provider)<em>service</em> callback:(void ( ^ ) ( sp_scrobbling_state state , NSError *error ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>service</em></dt>
			<dd><p>The social service to get status for.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the scrobbling state of the given service, or an <code>NSError</code> if a problem occurred.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/flushCaches:" title="flushCaches:"></a>
	<h3 class="subsubtitle method-title">flushCaches:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Manually flush libSpotify&rsquo;s caches.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)flushCaches:(void ( ^ ) ( ))<em>completionBlock</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>completionBlock</em></dt>
			<dd><p>The block to be called when the operation has completed.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method will force libSpotify to flush its caches. If you&rsquo;re writing an iOS application, call
this when your application is put into the background to ensure correct operation.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/imageForURL:callback:" title="imageForURL:callback:"></a>
	<h3 class="subsubtitle method-title">imageForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an <a href="../Classes/SPImage.html">SPImage</a> object representing the given URL, or <code>nil</code> if the URL is not a valid image URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)imageForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPImage *image ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the image.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the image, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/initWithApplicationKey:userAgent:loadingPolicy:error:" title="initWithApplicationKey:userAgent:loadingPolicy:error:"></a>
	<h3 class="subsubtitle method-title">initWithApplicationKey:userAgent:loadingPolicy:error:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Initialize a new SPSession object.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (id)initWithApplicationKey:(NSData *)<em>appKey</em> userAgent:(NSString *)<em>userAgent</em> loadingPolicy:(SPAsyncLoadingPolicy)<em>policy</em> error:(NSError **)<em>error</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>appKey</em></dt>
			<dd><p>Your application key as an NSData.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>userAgent</em></dt>
			<dd><p>Your application&rsquo;s <a href="#//api/name/user">user</a> agent (for example, com.yourcompany.MyGreatApp).</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>policy</em></dt>
			<dd><p>The loading policy to use.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>error</em></dt>
			<dd><p>An error pointer to be filled with an NSError should a login problem occur.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns a newly initialised SPSession object.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Your application key and <a href="#//api/name/user">user</a> agent must be valid to create an SPSession object. This is SPSession&rsquo;s designated initializer.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/logout:" title="logout:"></a>
	<h3 class="subsubtitle method-title">logout:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Log out from the Spotify service.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)logout:(void ( ^ ) ( ))<em>completionBlock</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>completionBlock</em></dt>
			<dd><p>The block to be called when the logout process has completed.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method will cleanly log out from the Spotify service and clear any in-memory caches.
Called automatically when the instance is deallocated.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/objectRepresentationForSpotifyURL:callback:" title="objectRepresentationForSpotifyURL:callback:"></a>
	<h3 class="subsubtitle method-title">objectRepresentationForSpotifyURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an object representation of the given Spotify URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)objectRepresentationForSpotifyURL:(NSURL *)<em>aSpotifyUrlOfSomeKind</em> callback:(void ( ^ ) ( sp_linktype linkType , id objectRepresentation ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>aSpotifyUrlOfSomeKind</em></dt>
			<dd><p>A Spotify URL (starting <code>spotify:</code>).</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the <code>sp_linktype</code> and object representation of the URL, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method works just like -albumForURL:, -artistForURL: and so on, except that it works out
what the given URL represents and returns that for you.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/objectRepresentationForSpotifyURL:linkType:" title="objectRepresentationForSpotifyURL:linkType:"></a>
	<h3 class="subsubtitle method-title">objectRepresentationForSpotifyURL:linkType:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an object representation of the given Spotify URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (id)objectRepresentationForSpotifyURL:(NSURL *)<em>aSpotifyUrlOfSomeKind</em> linkType:(sp_linktype *)<em>linkType</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>aSpotifyUrlOfSomeKind</em></dt>
			<dd><p>A Spotify URL (starting <code>spotify:</code>).</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>linkType</em></dt>
			<dd><p>An optional pointer to an <code>sp_linktype</code> that will be filled with the type of object returned.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns the created object, or nil if the URL is invalid.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<div class="warning"><p><strong>Warning:</strong> This method <em>must</em> be called on the libSpotify thread. See the
&ldquo;Threading&rdquo; section of the library&rsquo;s readme for more information.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playTrack:callback:" title="playTrack:callback:"></a>
	<h3 class="subsubtitle method-title">playTrack:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Start <a href="#//api/name/playing">playing</a> the given track.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)playTrack:(SPTrack *)<em>aTrack</em> callback:(SPErrorableOperationCallback)<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>aTrack</em></dt>
			<dd><p>The track to play.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>A block to be called when operation has successfully begun. The error parameter will be non-<code>nil</code> is an error occurred.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playlistFolderForFolderId:inContainer:" title="playlistFolderForFolderId:inContainer:"></a>
	<h3 class="subsubtitle method-title">playlistFolderForFolderId:inContainer:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and cache an <a href="../Classes/SPPlaylistFolder.html">SPPlaylistFolder</a> for the given folder ID from the C LibSpotify API.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (SPPlaylistFolder *)playlistFolderForFolderId:(sp_uint64)<em>playlistId</em> inContainer:(SPPlaylistContainer *)<em>aContainer</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>playlistId</em></dt>
			<dd><p>The folder ID.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>aContainer</em></dt>
			<dd><p>The <a href="../Classes/SPPlaylistContainer.html">SPPlaylistContainer</a> that contains the given folder.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns the created or cached <a href="../Classes/SPPlaylistFolder.html">SPPlaylistFolder</a> object.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method caches <a href="../Classes/SPPlaylistFolder.html">SPPlaylistFolder</a> objects by ID.</p><div class="warning"><p><strong>Warning:</strong> This method <em>must</em> be called on the libSpotify thread. See the
&ldquo;Threading&rdquo; section of the library&rsquo;s readme for more information.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playlistForPlaylistStruct:" title="playlistForPlaylistStruct:"></a>
	<h3 class="subsubtitle method-title">playlistForPlaylistStruct:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and cache an <a href="../Classes/SPPlaylist.html">SPPlaylist</a> for the given sp_playlist struct from the C LibSpotify API.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (SPPlaylist *)playlistForPlaylistStruct:(sp_playlist *)<em>playlist</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>playlist</em></dt>
			<dd><p>The sp_playlist struct.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns the created or cached <a href="../Classes/SPPlaylist.html">SPPlaylist</a> object.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method caches SPPlaylist objects using the same cache the [SPPlaylist playlist&hellip;]
convenience methods use.</p><div class="warning"><p><strong>Warning:</strong> This method <em>must</em> be called on the libSpotify thread. See the
&ldquo;Threading&rdquo; section of the library&rsquo;s readme for more information.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/playlistForURL:callback:" title="playlistForURL:callback:"></a>
	<h3 class="subsubtitle method-title">playlistForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an <a href="../Classes/SPPlaylist.html">SPPlaylist</a> object representing the given URL, or <code>nil</code> if the URL is not a valid playlist URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)playlistForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPPlaylist *playlist ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the playlist.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the playlist, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/postTracks:toInboxOfUser:withMessage:callback:" title="postTracks:toInboxOfUser:withMessage:callback:"></a>
	<h3 class="subsubtitle method-title">postTracks:toInboxOfUser:withMessage:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Send tracks to another Spotify <a href="#//api/name/user">user</a>.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (SPPostTracksToInboxOperation *)postTracks:(NSArray *)<em>tracks</em> toInboxOfUser:(NSString *)<em>targetUserName</em> withMessage:(NSString *)<em>aFriendlyMessage</em> callback:(SPErrorableOperationCallback)<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>tracks</em></dt>
			<dd><p>An array of <a href="../Classes/SPTrack.html">SPTrack</a> objects to send.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>targetUserName</em></dt>
			<dd><p>The username of the <a href="#//api/name/user">user</a> to send the tracks to.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>aFriendlyMessage</em></dt>
			<dd><p>The message to send with the tracks, if any.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The <code>SPErrorableOperationCallback</code> block to be called with an <code>NSError</code> if the operation failed or <code>nil</code> if the operation succeeded.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns an <a href="../Classes/SPPostTracksToInboxOperation.html">SPPostTracksToInboxOperation</a> object representing the operation.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<div class="warning"><p><strong>Warning:</strong> Tracks will be posted to the given <a href="#//api/name/user">user</a> as soon as this
method is called. Be sure you want to post the tracks before doing so!</p></div>
	</div>
	
	
	
	
	
	<div class="method-subsection see-also-section">
		<h4 class="method-subtitle">See Also</h4>
		<ul>
			
			<li><code><p><a href="../Classes/SPPostTracksToInboxOperation.html">SPPostTracksToInboxOperation</a></p></code></li>
			
		</ul>
	</div>
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/preloadTrackForPlayback:callback:" title="preloadTrackForPlayback:callback:"></a>
	<h3 class="subsubtitle method-title">preloadTrackForPlayback:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Preloads playback assets for the given track.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)preloadTrackForPlayback:(SPTrack *)<em>aTrack</em> callback:(SPErrorableOperationCallback)<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>aTrack</em></dt>
			<dd><p>The track to preload.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>A block to be called when operation has successfully begun. The error parameter will be non-<code>nil</code> is an error occurred.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>For smooth changes between tracks, you can use this method to start loading track playback
data before the track needs to be played. The Spotify client does this a few seconds before moving
to the next track during normal playback.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/searchForURL:callback:" title="searchForURL:callback:"></a>
	<h3 class="subsubtitle method-title">searchForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an <a href="../Classes/SPSearch.html">SPSearch</a> object representing the given URL, or <code>nil</code> if the URL is not a valid search URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)searchForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPSearch *search ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the search query.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the search, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/seekPlaybackToOffset:" title="seekPlaybackToOffset:"></a>
	<h3 class="subsubtitle method-title">seekPlaybackToOffset:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Seek the current playback position to the given time.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)seekPlaybackToOffset:(NSTimeInterval)<em>offset</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>offset</em></dt>
			<dd><p>The time at which to seek to. Must be between 0.0 and the duration of the <a href="#//api/name/playing">playing</a> track.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setMaximumCacheSizeMB:" title="setMaximumCacheSizeMB:"></a>
	<h3 class="subsubtitle method-title">setMaximumCacheSizeMB:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Set the maximum cache size, in megabytes.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)setMaximumCacheSizeMB:(size_t)<em>maximumCacheSizeMB</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>maximumCacheSizeMB</em></dt>
			<dd><p>The maxiumum cache size, in MB, or 0 to automatically manage disk space.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Set to 0 (the default) to automatically manage the cache, using at most 10% of the free disk space.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setPreferredBitrate:" title="setPreferredBitrate:"></a>
	<h3 class="subsubtitle method-title">setPreferredBitrate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Set the preferred audio bitrate for playback.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)setPreferredBitrate:(sp_bitrate)<em>bitrate</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>bitrate</em></dt>
			<dd><p>The preferred bitrate for streaming.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The default is to play the highest quality stream available.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setScrobblingState:forService:callback:" title="setScrobblingState:forService:callback:"></a>
	<h3 class="subsubtitle method-title">setScrobblingState:forService:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Sets the scrobbling status for the given social service.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)setScrobblingState:(sp_scrobbling_state)<em>state</em> forService:(sp_social_provider)<em>service</em> callback:(SPErrorableOperationCallback)<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>state</em></dt>
			<dd><p>The desired scrobbling state. Note: Setting global status isn&rsquo;t yet supported.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>service</em></dt>
			<dd><p>The social service to set scrobbling state for.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The <code>SPErrorableOperationCallback</code> block to be called with an <code>NSError</code> if the operation failed or <code>nil</code> if the operation succeeded.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/setScrobblingUserName:password:forService:callback:" title="setScrobblingUserName:password:forService:callback:"></a>
	<h3 class="subsubtitle method-title">setScrobblingUserName:password:forService:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Sets the scrobbling credientials for the given social service.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)setScrobblingUserName:(NSString *)<em>userName</em> password:(NSString *)<em>password</em> forService:(sp_social_provider)<em>service</em> callback:(SPErrorableOperationCallback)<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>userName</em></dt>
			<dd><p>The username for the service (i.e., Last.fm).</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>password</em></dt>
			<dd><p>The password for the service.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>service</em></dt>
			<dd><p>The social service to set credentials for.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The <code>SPErrorableOperationCallback</code> block to be called with an <code>NSError</code> if the operation failed or <code>nil</code> if the operation succeeded.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Call <a href="#//api/name/setScrobblingState:forService:callback:"><code>setScrobblingState:forService:callback:</code></a> to force a new connection after changing details. If the credentials
are invalid, the <code>session:didEncounterScrobblingError:</code> method on your <a href="../Protocols/SPSessionDelegate.html"><code>SPSessionDelegate</code></a> will be called with more information.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/trackForTrackStruct:" title="trackForTrackStruct:"></a>
	<h3 class="subsubtitle method-title">trackForTrackStruct:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and cache an <a href="../Classes/SPTrack.html">SPTrack</a> for the given sp_track struct from the C LibSpotify API.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (SPTrack *)trackForTrackStruct:(sp_track *)<em>track</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>track</em></dt>
			<dd><p>The sp_track struct.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns the created or cached <a href="../Classes/SPTrack.html">SPTrack</a> object.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method caches SPTrack objects using the same cache the [SPTrack track&hellip;]
convenience methods use.</p><div class="warning"><p><strong>Warning:</strong> This method <em>must</em> be called on the libSpotify thread. See the
&ldquo;Threading&rdquo; section of the library&rsquo;s readme for more information.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/trackForURL:callback:" title="trackForURL:callback:"></a>
	<h3 class="subsubtitle method-title">trackForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an <a href="../Classes/SPTrack.html">SPTrack</a> object representing the given URL, or <code>nil</code> if the URL is not a valid track URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)trackForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPTrack *track ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the track.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the track, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/unknownPlaylistForPlaylistStruct:" title="unknownPlaylistForPlaylistStruct:"></a>
	<h3 class="subsubtitle method-title">unknownPlaylistForPlaylistStruct:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and cache an SPUnknownPlaylist (subclass of <a href="../Classes/SPPlaylist.html">SPPlaylist</a>) for the given sp_playlist struct from the C LibSpotify API.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (SPUnknownPlaylist *)unknownPlaylistForPlaylistStruct:(sp_playlist *)<em>playlist</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>playlist</em></dt>
			<dd><p>The sp_playlist struct.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns the created or cached SPUnknownPlaylist object.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method caches SPUnknownPlaylist objects using the same cache the [SPPlaylist playlist&hellip;]
convenience methods use.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/unloadPlayback" title="unloadPlayback"></a>
	<h3 class="subsubtitle method-title">unloadPlayback</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Unload playback resources from memory.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)unloadPlayback</code></div>
	
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Call this when you&rsquo;re done <a href="#//api/name/playing">playing</a> to free up some memory. Called automatically on
instance deallocation.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/userForURL:callback:" title="userForURL:callback:"></a>
	<h3 class="subsubtitle method-title">userForURL:callback:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns an <a href="../Classes/SPUser.html">SPUser</a> object representing the given URL, or <code>nil</code> if the URL is not a valid <a href="#//api/name/user">user</a> URL.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (void)userForURL:(NSURL *)<em>url</em> callback:(void ( ^ ) ( SPUser *user ))<em>block</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>url</em></dt>
			<dd><p>The URL of the <a href="#//api/name/user">user</a>.</p></dd>
		</dl>
		
		<dl class="argument-def parameter-def">
			<dt><em>block</em></dt>
			<dd><p>The block to be called with the <a href="#//api/name/user">user</a>, or <code>nil</code> if given an invalid URL.</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/userForUserStruct:" title="userForUserStruct:"></a>
	<h3 class="subsubtitle method-title">userForUserStruct:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Create and cache an <a href="../Classes/SPUser.html">SPUser</a> for the given sp_<a href="#//api/name/user">user</a> struct from the C LibSpotify API.</p>
	</div>		
	
	
	<div class="method-subsection method-declaration"><code>- (SPUser *)userForUserStruct:(sp_user *)<em>user</em></code></div>
	
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>user</em></dt>
			<dd><p>The sp_<a href="#//api/name/user">user</a> struct.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Returns the created or cached <a href="../Classes/SPUser.html">SPUser</a> object.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method caches SPUser objects using the same cache the [SPUser user&hellip;]
convenience methods use.</p><div class="warning"><p><strong>Warning:</strong> This method <em>must</em> be called on the libSpotify thread. See the
&ldquo;Threading&rdquo; section of the library&rsquo;s readme for more information.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">SPSession.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2012 Spotify AB. All rights reserved. (Last updated: 2012-11-14)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>